﻿CREATE TABLE [dbo].[EmployerContact] (
    [EmployerId]    UNIQUEIDENTIFIER NOT NULL,
    [ContactId]     UNIQUEIDENTIFIER NOT NULL,
    [ContactTypeId] INT              NOT NULL,
    CONSTRAINT [PK_CompanyContact_1] PRIMARY KEY CLUSTERED ([EmployerId] ASC, [ContactId] ASC, [ContactTypeId] ASC),
    CONSTRAINT [FK_EmployerContact_Contact] FOREIGN KEY ([ContactId]) REFERENCES [dbo].[Contact] ([ContactId]),
    CONSTRAINT [FK_EmployerContact_ContactType] FOREIGN KEY ([ContactTypeId]) REFERENCES [dbo].[ContactType] ([ContactTypeId]),
    CONSTRAINT [FK_EmployerContact_Employer] FOREIGN KEY ([EmployerId]) REFERENCES [dbo].[Employer] ([EmployerId])
);



